package com.guo.fristspringboot.controller;

import com.guo.fristspringboot.entity.Guo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/guo")
public class GuoController {

    @RequestMapping("/get")
    public String getGuo(){
        System.out.println("进入到getGuo方法中111");
        return "进入到getGuo方法中111";
    }


    @PostMapping("/post/{aa}")
    public Guo postGuo(@RequestBody Guo guo, @RequestParam(value="gg",required = false) String ggb, @PathVariable String aa){
        Guo guo1=null;
        if(guo!=null){
             guo1 = guo;
            System.out.println(guo1.toString());
        }
        if(ggb!=null){
            System.out.println(ggb);
        }
        if(aa!=null){
            System.out.println(aa);
        }

        System.out.println("进入到getGuo方法中111");
        return guo1;
    }
}
